#{extends 'Houses/base.html' /}
#{set title:'House' /}

#{set 'moreSubpageStyles'}
<style type="text/css">
	.img-responsive{
		max-height : 200px;
		height : 200px\9;
	}
</style>
#{/set}
		<ol class="breadcrumb">
			<li><a href="#">首页</a></li>
			<li class="active">社区租房</li>
		</ol>
		<div class="panel panel-default">
		  <div class="panel-body filter">
		   		<dl>
		   			<dt data-name="rent" data-title="租金">租金</dt>
		   				<dd  id = "price" class="chose-type">
		   					<a class="active">不限</a>
		   					<a >800元以下</a>
		   					<a >800-1500元</a>
		   					<a >1500-2000元</a>
		   					<a >2000-3000元</a>
		   					<a >3000元-5000元</a>
		   					<a >5000以上</a>
		   					<span>
		   						<label>
		   							<input class="num-only" type="text" name="lowPrice"/>
		   						</label>
		   						-
		   						<label>
		   							<input type="text" class="num-only" name="higPrice">
		   						</label>
								元
		   					</span>
		   					<button class="btn btn-default  btn-sm btn-find choose-input" >筛选</button>
		   				</dd>
			   			<dt  data-name="room" data-title="房型">房型</dt>
		   				<dd id="room" class="chose-type">
		   					<a href="" class="active">不限</a>
		   					<a href="">1室</a>
		   					<a href="">2室</a>
		   					<a href="">3室</a>
		   					<a href="">4室</a>
		   					<a href="">5室以上</a>
		   					<span>
		   						<label>
		   							<input class="num-only" type="text"/>
		   						</label>
		   						室
		   						<label>
		   							<input class="num-only" type="text">
		   						</label>
								厅
								<label>
		   							<input class="num-only" type="text">
		   						</label>
		   						卫
		   					</span>
		   					<button class="btn btn-default  btn-sm btn-find choose-input">筛选</button>
		   				</dd>
		   			<dt data-name="feature">特色</dt>
		   				<dd>
		   					<a  class="active">不限</a>
		   					<a>精装修</a>
		   					<a>中等</a>
		   					<a>简单</a>
		   					<a >毛胚</a>
		   				</dd>
		   			<dt data-name="type">房屋类型</dt>
		   				<dd>
		   					<a href="" class="active">平房</a>
		   					<a href="">普通住宅</a>
		   					<a href="">商住两用</a>
		   					<a href="">别墅</a>
		   					<a href="">其他</a>
		   				</dd>
		   			<dt>楼层</dt>
		   			<dd id="room" class="chose-type">
		   				<div class="moreitem-box" data-name="floor">
			   					<div class="moreitem-btn"><a >楼层</a>
			   					</div>
			   					<ul class="moreitem" >
			   						<li><a>1楼</a></li>
			   						<li><a>2楼</a></li>
			   						<li><a>3楼</a></li>
			   						<li><a>4楼</a></li>
			   						<li><a>5楼</a></li>
			   						<li><a>6楼</a></li>
			   						<li><a>7楼</a></li>
			   						<li><a >7楼以上</a></li>
			   					</ul>
		   					</div>			   					
		   				</dd>
		   		</dl>
		  </div>
		  <dl class="choose-fliter">
			  	<dt>筛选条件</dt>
			  		<dd>
			  		<form action="" class="form-filter">
			  			<ul class="list-inline">
			  				<li class="alert alert-warning"><input name='rent' value="1500-2000元" readonly/>
			  				<a class="close-icon">&times;</a></li>
			  				<li class="alert alert-warning"><input name='floor'value="1楼" readonly/><a class="close-icon">&times;</a></li>
			  				<li><button class="btn btn-default  btn-sm btn-find" id="submit">确定</button></li>
			  			</ul>
			  			 </form>
			  		</dd>
			  	</dl>
		</div>
<!--****************************显示信息*****************************************-->
<h4>当前页为第${pageBean.curPage}页，总计${pageBean.total}条结果</h4>	
		<div class="house-show main-content">
			<table class="table table-hover">
%{index=0;}%
#{list items:houseList,as :'house'}

				<tr>
					<td class="col-xs-4"><a href="#" class="thumbnail"><img src="${firstPhotoUrl[index]}" data-src="holder.js/100%x180" alt="house"></a></td>


					<td class="house-info">
						<a href="@{Houses.showHouseInfo(house.id)}">${house.community} 
							${house.address}</a>
						<br>
						<p>
						<small>出租方式：${house.way}</small>
						<small>户型：${house.bedRoom}室${house.livingRoom}厅${house.bathRoom}卫</small><br>
						<small>楼层：${house.currentFloor}楼，共${house.countFloor}层</small><br>
						<small>装修情况：${house.decorationSituation}</small><br>
						<small>住宅类型：${house.classSituation}</small><br>
						<small>联系人：${house.contacts}</small>
						<small>联系方式：${house.phone}</small>
						<p>
					</td>
					<td><p><em class="price">${house.price}</em>元</p></td>
%{index++;}%			</tr>			
#{/list}				
				
			</table>
			
				<ul class="pagination pull-right">
					<li><a href="#">&laquo;</a></li>
					%{ for(int i=1;i<=(pageBean.total+4)/pageBean.perPage;i++) {  }%
    				 <li><a href="/Houses/showHouses?page=${i}">${i}</a></li>
					%{ } }%
					<li><a href="#">&raquo;</a></li>
				</ul>

		</div>
